<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent);$(NetCoreAppPrevious);$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
    <NoWarn>$(NoWarn);CA2249</NoWarn>
    <!-- opt-out of trimming until it works https://github.com/dotnet/runtime/issues/49062 -->
    <IsTrimmable>false</IsTrimmable>
    <EnableAOTAnalyzer>false</EnableAOTAnalyzer>
    <IncludeInternalObsoleteAttribute>true</IncludeInternalObsoleteAttribute>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
    <IsPackable>true</IsPackable>
    <PackageDescription>Provides types that support using XML configuration files (app.config). This package exists only to support migrating existing .NET Framework code that already uses System.Configuration. When writing new code, use another configuration system instead, such as Microsoft.Extensions.Configuration.</PackageDescription>

    <!-- TODO https://github.com/dotnet/runtime/issues/90400: Annotate for nullable reference types -->
    <Nullable>disable</Nullable>
    <NoWarn>$(NoWarn);nullable</NoWarn>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
  </PropertyGroup>

  <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
    <Compile Include="System\Configuration\DictionarySectionHandler.cs" />
    <Compile Include="System\Configuration\DpapiProtectedConfigurationProvider.cs" />
    <Compile Include="System\Configuration\IConfigurationSystem.cs" />
    <Compile Include="System\Configuration\IdnElement.cs" />
    <Compile Include="System\Configuration\Internal\DummyDisposable.cs" />
    <Compile Include="System\Configuration\IPersistComponentSettings.cs" />
    <Compile Include="System\Configuration\ApplicationSettingsBase.cs" />
    <Compile Include="System\Configuration\ApplicationScopedSettingAttribute.cs" />
    <Compile Include="System\Configuration\ApplicationSettingsGroup.cs" />
    <Compile Include="System\Configuration\AppSettingsReader.cs" />
    <Compile Include="System\Configuration\AppSettingsSection.cs" />
    <Compile Include="System\Configuration\BaseConfigurationRecord.cs" />
    <Compile Include="System\Configuration\CallbackValidator.cs" />
    <Compile Include="System\Configuration\CallbackValidatorAttribute.cs" />
    <Compile Include="System\Configuration\ClientConfigPaths.cs" />
    <Compile Include="System\Configuration\ClientConfigurationHost.cs" />
    <Compile Include="System\Configuration\ClientConfigurationSystem.cs" />
    <Compile Include="System\Configuration\ClientSettingsSection.cs" />
    <Compile Include="System\Configuration\ClientSettingsStore.cs" />
    <Compile Include="System\Configuration\CommaDelimitedStringAttributeCollectionConverter.cs" />
    <Compile Include="System\Configuration\CommonConfigurationStrings.cs" />
    <Compile Include="System\Configuration\ConfigDefinitionUpdates.cs" />
    <Compile Include="System\Configuration\ConfigPathUtility.cs" />
    <Compile Include="System\Configuration\Configuration.cs" />
    <Compile Include="System\Configuration\ConfigurationAllowDefinition.cs" />
    <Compile Include="System\Configuration\ConfigurationAllowExeDefinition.cs" />
    <Compile Include="System\Configuration\ConfigurationCollectionAttribute.cs" />
    <Compile Include="System\Configuration\ConfigurationConverterBase.cs" />
    <Compile Include="System\Configuration\ConfigurationElement.cs" />
    <Compile Include="System\Configuration\ConfigurationElementCollection.cs" />
    <Compile Include="System\Configuration\ConfigurationElementCollectionType.cs" />
    <Compile Include="System\Configuration\ConfigurationElementProperty.cs" />
    <Compile Include="System\Configuration\ConfigurationErrorsException.cs" />
    <Compile Include="System\Configuration\ConfigurationException.cs" />
    <Compile Include="System\Configuration\ConfigurationFileMap.cs" />
    <Compile Include="System\Configuration\ConfigurationLocation.cs" />
    <Compile Include="System\Configuration\ConfigurationLocationCollection.cs" />
    <Compile Include="System\Configuration\ConfigurationLockCollection.cs" />
    <Compile Include="System\Configuration\ConfigurationLockCollectionType.cs" />
    <Compile Include="System\Configuration\ConfigurationManager.cs" />
    <Compile Include="System\Configuration\ConfigurationManagerInternalFactory.cs" />
    <Compile Include="System\Configuration\ConfigurationProperty.cs" />
    <Compile Include="System\Configuration\ConfigurationPropertyAttribute.cs" />
    <Compile Include="System\Configuration\ConfigurationPropertyCollection.cs" />
    <Compile Include="System\Configuration\ConfigurationPropertyOptions.cs" />
    <Compile Include="System\Configuration\ConfigurationSaveMode.cs" />
    <Compile Include="System\Configuration\ConfigurationSchemaErrors.cs" />
    <Compile Include="System\Configuration\ConfigurationSection.cs" />
    <Compile Include="System\Configuration\ConfigurationSectionCollection.cs" />
    <Compile Include="System\Configuration\ConfigurationSectionGroup.cs" />
    <Compile Include="System\Configuration\ConfigurationSectionGroupCollection.cs" />
    <Compile Include="System\Configuration\ConfigurationSettings.cs" />
    <Compile Include="System\Configuration\ConfigurationUserLevel.cs" />
    <Compile Include="System\Configuration\ConfigurationValidatorAttribute.cs" />
    <Compile Include="System\Configuration\ConfigurationValidatorBase.cs" />
    <Compile Include="System\Configuration\ConfigurationValue.cs" />
    <Compile Include="System\Configuration\ConfigurationValueFlags.cs" />
    <Compile Include="System\Configuration\ConfigurationValues.cs" />
    <Compile Include="System\Configuration\ConfigXmlAttribute.cs" />
    <Compile Include="System\Configuration\ConfigXmlCDataSection.cs" />
    <Compile Include="System\Configuration\ConfigXmlComment.cs" />
    <Compile Include="System\Configuration\ConfigXmlDocument.cs" />
    <Compile Include="System\Configuration\ConfigXmlElement.cs" />
    <Compile Include="System\Configuration\ConfigXmlReader.cs" />
    <Compile Include="System\Configuration\ConfigXmlSignificantWhitespace.cs" />
    <Compile Include="System\Configuration\ConfigXmlText.cs" />
    <Compile Include="System\Configuration\ConfigXmlWhitespace.cs" />
    <Compile Include="System\Configuration\ConnectionStringSettings.cs" />
    <Compile Include="System\Configuration\ConnectionStringSettingsCollection.cs" />
    <Compile Include="System\Configuration\ConnectionStringsSection.cs" />
    <Compile Include="System\Configuration\ContextInformation.cs" />
    <Compile Include="System\Configuration\DateTimeConfigurationCollection.cs" />
    <Compile Include="System\Configuration\DateTimeConfigurationElement.cs" />
    <Compile Include="System\Configuration\DeclarationUpdate.cs" />
    <Compile Include="System\Configuration\DefaultSection.cs" />
    <Compile Include="System\Configuration\DefaultSettingValueAttribute.cs" />
    <Compile Include="System\Configuration\DefaultValidator.cs" />
    <Compile Include="System\Configuration\DefinitionUpdate.cs" />
    <Compile Include="System\Configuration\ElementInformation.cs" />
    <Compile Include="System\Configuration\EmptyImpersonationContext.cs" />
    <Compile Include="System\Configuration\ErrorInfoXmlDocument.cs" />
    <Compile Include="System\Configuration\ErrorsHelper.cs" />
    <Compile Include="System\Configuration\ExceptionAction.cs" />
    <Compile Include="System\Configuration\ExceptionUtil.cs" />
    <Compile Include="System\Configuration\ExeConfigurationFileMap.cs" />
    <Compile Include="System\Configuration\ExeContext.cs" />
    <Compile Include="System\Configuration\FactoryId.cs" />
    <Compile Include="System\Configuration\FactoryRecord.cs" />
    <Compile Include="System\Configuration\GenericEnumConverter.cs" />
    <Compile Include="System\Configuration\HandlerBase.cs" />
    <Compile Include="System\Configuration\IApplicationSettingsProvider.cs" />
    <Compile Include="System\Configuration\IConfigurationSectionHandler.cs" />
    <Compile Include="System\Configuration\IgnoreSection.cs" />
    <Compile Include="System\Configuration\IgnoreSectionHandler.cs" />
    <Compile Include="System\Configuration\ImplicitMachineConfigHost.cs" />
    <Compile Include="System\Configuration\InfiniteIntConverter.cs" />
    <Compile Include="System\Configuration\InfiniteTimeSpanConverter.cs" />
    <Compile Include="System\Configuration\IntegerValidator.cs" />
    <Compile Include="System\Configuration\IntegerValidatorAttribute.cs" />
    <Compile Include="System\Configuration\Internal\ConfigSystem.cs" />
    <Compile Include="System\Configuration\Internal\ConfigurationManagerInternal.cs" />
    <Compile Include="System\Configuration\Internal\DelegatingConfigHost.cs" />
    <Compile Include="System\Configuration\Internal\FileVersion.cs" />
    <Compile Include="System\Configuration\HResults.cs" />
    <Compile Include="System\Configuration\Internal\IConfigErrorInfo.cs" />
    <Compile Include="System\Configuration\Internal\IConfigSystem.cs" />
    <Compile Include="System\Configuration\Internal\IConfigurationManagerHelper.cs" />
    <Compile Include="System\Configuration\Internal\IConfigurationManagerInternal.cs" />
    <Compile Include="System\Configuration\Internal\IInternalConfigClientHost.cs" />
    <Compile Include="System\Configuration\Internal\IInternalConfigConfigurationFactory.cs" />
    <Compile Include="System\Configuration\Internal\IInternalConfigHost.cs" />
    <Compile Include="System\Configuration\Internal\IInternalConfigHostPaths.cs" />
    <Compile Include="System\Configuration\Internal\IInternalConfigRecord.cs" />
    <Compile Include="System\Configuration\Internal\IInternalConfigRoot.cs" />
    <Compile Include="System\Configuration\Internal\IInternalConfigSettingsFactory.cs" />
    <Compile Include="System\Configuration\Internal\IInternalConfigSystem.cs" />
    <Compile Include="System\Configuration\Internal\InternalConfigConfigurationFactory.cs" />
    <Compile Include="System\Configuration\Internal\InternalConfigEventArgs.cs" />
    <Compile Include="System\Configuration\Internal\InternalConfigEventHandler.cs" />
    <Compile Include="System\Configuration\Internal\InternalConfigHost.cs" />
    <Compile Include="System\Configuration\Internal\InternalConfigRoot.cs" />
    <Compile Include="System\Configuration\Internal\InternalConfigSettingsFactory.cs" />
    <Compile Include="System\Configuration\Internal\StreamChangeCallback.cs" />
    <Compile Include="System\Configuration\Internal\WriteFileContext.cs" />
    <Compile Include="System\Configuration\InvalidPropValue.cs" />
    <Compile Include="System\Configuration\IriParsingElement.cs" />
    <Compile Include="System\Configuration\ISettingsProviderService.cs" />
    <Compile Include="System\Configuration\KeyValueConfigurationCollection.cs" />
    <Compile Include="System\Configuration\KeyValueConfigurationElement.cs" />
    <Compile Include="System\Configuration\KeyValueInternalCollection.cs" />
    <Compile Include="System\Configuration\LocalFileSettingsProvider.cs" />
    <Compile Include="System\Configuration\LocationSectionRecord.cs" />
    <Compile Include="System\Configuration\LocationUpdates.cs" />
    <Compile Include="System\Configuration\LongValidator.cs" />
    <Compile Include="System\Configuration\LongValidatorAttribute.cs" />
    <Compile Include="System\Configuration\MgmtConfigurationRecord.cs" />
    <Compile Include="System\Configuration\NamespaceChange.cs" />
    <Compile Include="System\Configuration\NameValueConfigurationCollection.cs" />
    <Compile Include="System\Configuration\NameValueConfigurationElement.cs" />
    <Compile Include="System\Configuration\NameValueFileSectionHandler.cs" />
    <Compile Include="System\Configuration\NameValueSectionHandler.cs" />
    <Compile Include="System\Configuration\OverrideMode.cs" />
    <Compile Include="System\Configuration\OverrideModeSetting.cs" />
    <Compile Include="System\Configuration\PositiveTimeSpanValidator.cs" />
    <Compile Include="System\Configuration\PositiveTimeSpanValidatorAttribute.cs" />
    <Compile Include="System\Configuration\PrivilegedConfigurationManager.cs" />
    <Compile Include="System\Configuration\PropertyInformation.cs" />
    <Compile Include="System\Configuration\PropertyInformationCollection.cs" />
    <Compile Include="System\Configuration\PropertySourceInfo.cs" />
    <Compile Include="System\Configuration\PropertyValueOrigin.cs" />
    <Compile Include="System\Configuration\ProtectedConfiguration.cs" />
    <Compile Include="System\Configuration\ProtectedConfigurationProvider.cs" />
    <Compile Include="System\Configuration\ProtectedConfigurationProviderCollection.cs" />
    <Compile Include="System\Configuration\ProtectedConfigurationSection.cs" />
    <Compile Include="System\Configuration\ProtectedProviderSettings.cs" />
    <Compile Include="System\Configuration\Provider\ProviderBase.cs" />
    <Compile Include="System\Configuration\Provider\ProviderCollection.cs" />
    <Compile Include="System\Configuration\Provider\ProviderException.cs" />
    <Compile Include="System\Configuration\ProviderSettings.cs" />
    <Compile Include="System\Configuration\ProviderSettingsCollection.cs" />
    <Compile Include="System\Configuration\ReadOnlyNameValueCollection.cs" />
    <Compile Include="System\Configuration\RegexStringValidator.cs" />
    <Compile Include="System\Configuration\RegexStringValidatorAttribute.cs" />
    <Compile Include="System\Configuration\RsaProtectedConfigurationProvider.cs" />
    <Compile Include="System\Configuration\RuntimeConfigurationRecord.cs" />
    <Compile Include="System\Configuration\SafeBitVector32.cs" />
    <Compile Include="System\Configuration\SchemeSettingElement.cs" />
    <Compile Include="System\Configuration\SchemeSettingElementCollection.cs" />
    <Compile Include="System\Configuration\SchemeSettingInternal.cs" />
    <Compile Include="System\Configuration\SectionInformation.cs" />
    <Compile Include="System\Configuration\SectionInput.cs" />
    <Compile Include="System\Configuration\SectionRecord.cs" />
    <Compile Include="System\Configuration\SectionUpdates.cs" />
    <Compile Include="System\Configuration\SectionXmlInfo.cs" />
    <Compile Include="System\Configuration\SettingAttribute.cs" />
    <Compile Include="System\Configuration\SettingChangingEventArgs.cs" />
    <Compile Include="System\Configuration\SettingChangingEventHandler.cs" />
    <Compile Include="System\Configuration\SettingElement.cs" />
    <Compile Include="System\Configuration\SettingElementCollection.cs" />
    <Compile Include="System\Configuration\SettingsAttributeDictionary.cs" />
    <Compile Include="System\Configuration\SettingsBase.cs" />
    <Compile Include="System\Configuration\SettingsContext.cs" />
    <Compile Include="System\Configuration\SettingsDescriptionAttribute.cs" />
    <Compile Include="System\Configuration\SettingsGroupDescriptionAttribute.cs" />
    <Compile Include="System\Configuration\SettingsGroupNameAttribute.cs" />
    <Compile Include="System\Configuration\SettingsLoadedEventArgs.cs" />
    <Compile Include="System\Configuration\SettingsLoadedEventHandler.cs" />
    <Compile Include="System\Configuration\SettingsManageability.cs" />
    <Compile Include="System\Configuration\SettingsManageabilityAttribute.cs" />
    <Compile Include="System\Configuration\SettingsPropertyCollection.cs" />
    <Compile Include="System\Configuration\SettingsPropertyIsReadOnlyException.cs" />
    <Compile Include="System\Configuration\SettingsPropertyNotFoundException.cs" />
    <Compile Include="System\Configuration\SettingsPropertyValueCollection.cs" />
    <Compile Include="System\Configuration\SettingsPropertyWrongTypeException.cs" />
    <Compile Include="System\Configuration\SettingsProvider.cs" />
    <Compile Include="System\Configuration\SettingsProviderAttribute.cs" />
    <Compile Include="System\Configuration\SettingsProviderCollection.cs" />
    <Compile Include="System\Configuration\SettingsSavingEventHandler.cs" />
    <Compile Include="System\Configuration\SettingsSerializeAsAttribute.cs" />
    <Compile Include="System\Configuration\SettingValueElement.cs" />
    <Compile Include="System\Configuration\SimpleBitVector32.cs" />
    <Compile Include="System\Configuration\SingleTagSectionHandler.cs" />
    <Compile Include="System\Configuration\SpecialSetting.cs" />
    <Compile Include="System\Configuration\SpecialSettingAttribute.cs" />
    <Compile Include="System\Configuration\StreamInfo.cs" />
    <Compile Include="System\Configuration\StreamUpdate.cs" />
    <Compile Include="System\Configuration\StringAttributeCollection.cs" />
    <Compile Include="System\Configuration\StringUtil.cs" />
    <Compile Include="System\Configuration\StringValidator.cs" />
    <Compile Include="System\Configuration\StringValidatorAttribute.cs" />
    <Compile Include="System\Configuration\SubclassTypeValidator.cs" />
    <Compile Include="System\Configuration\SubclassTypeValidatorAttribute.cs" />
    <Compile Include="System\Configuration\TimeSpanMinutesConverter.cs" />
    <Compile Include="System\Configuration\TimeSpanMinutesOrInfiniteConverter.cs" />
    <Compile Include="System\Configuration\TimeSpanSecondsConverter.cs" />
    <Compile Include="System\Configuration\TimeSpanSecondsOrInfiniteConverter.cs" />
    <Compile Include="System\Configuration\TimeSpanValidator.cs" />
    <Compile Include="System\Configuration\TimeSpanValidatorAttribute.cs" />
    <Compile Include="System\Configuration\TypeNameConverter.cs" />
    <Compile Include="System\Configuration\TypeUtil.cs" />
    <Compile Include="System\Configuration\Update.cs" />
    <Compile Include="System\Configuration\UpdateConfigHost.cs" />
    <Compile Include="System\Configuration\UriSection.cs" />
    <Compile Include="System\Configuration\UrlPath.cs" />
    <Compile Include="System\Configuration\UserScopedSettingAttribute.cs" />
    <Compile Include="System\Configuration\UserSettingsGroup.cs" />
    <Compile Include="System\Configuration\ValidatorCallback.cs" />
    <Compile Include="System\Configuration\ValidatorUtils.cs" />
    <Compile Include="System\Configuration\WhiteSpaceTrimStringConverter.cs" />
    <Compile Include="System\Configuration\XmlUtil.cs" />
    <Compile Include="System\Configuration\XmlUtilWriter.cs" />
    <Compile Include="System\Drawing\Configuration\SystemDrawingSection.cs" />
    <Compile Include="$(CommonPath)System\Security\IdentityHelper.cs" Link="Common\System\Security\IdentityHelper.cs" />
    <Compile Include="System\Configuration\SettingsProperty.cs" />
    <Compile Include="System\Configuration\SettingsPropertyValue.cs" />
    <Compile Include="System\Configuration\SettingsSerializeAs.cs" />
    <Compile Include="System\Configuration\NoSettingsVersionUpgradeAttribute.cs" />
    <Compile Include="System\UriIdnScope.cs" />
    <Compile Include="$(CommonPath)System\IO\TempFileCollection.cs" Link="Common\System\IO\TempFileCollection.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs" Link="Common\System\Obsoletions.cs" />
    <Compile Include="$(CoreLibSharedDir)System\Diagnostics\CodeAnalysis\UnconditionalSuppressMessageAttribute.cs" Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp'" />
  </ItemGroup>
  
  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <Compile Include="System\Diagnostics\DiagnosticsConfiguration.cs" />
    <Compile Include="System\Diagnostics\FilterElement.cs" />
    <Compile Include="System\Diagnostics\ListenerElementsCollection.cs" />
    <Compile Include="System\Diagnostics\SourceElementsCollection.cs" />
    <Compile Include="System\Diagnostics\SwitchElementsCollection.cs" />
    <Compile Include="System\Diagnostics\SystemDiagnosticsSection.cs" />
    <Compile Include="System\Diagnostics\TraceConfiguration.cs" />
    <Compile Include="System\Diagnostics\TraceSection.cs" />
    <Compile Include="System\Diagnostics\TypedElement.cs" />
    <Compile Include="System\Diagnostics\TraceUtils.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <ProjectReference Include="$(LibrariesProjectRoot)System.Diagnostics.EventLog\src\System.Diagnostics.EventLog.csproj" />
  </ItemGroup>

  <!-- This reference is for the System.Security.PermissionSet class, which is implemented in corelib, so the reference is only necessary for netstandard. -->
  <ItemGroup Condition="'$(TargetFramework)' == 'netstandard2.0'">
    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Permissions\src\System.Security.Permissions.csproj" PrivateAssets="all" />
  </ItemGroup>

  <ItemGroup Condition="'$(IsPartialFacadeAssembly)' != 'true'">
    <ProjectReference Include="$(LibrariesProjectRoot)System.Security.Cryptography.ProtectedData\src\System.Security.Cryptography.ProtectedData.csproj" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETFramework'">
    <Reference Include="System.Configuration" />
  </ItemGroup>

</Project>
